package com.ourteam.product.model.dao;

import net.dao.BaseQueryBean;
import net.dao.BaseWhereCriterion;
import net.dao.IDataAccessInterface;

import org.apache.commons.lang.StringUtils;

import java.util.Arrays;
import java.util.List;
import java.util.Map;


/**
 * Template Name : DAO查询对象
 * Template Version : 1
 * Template Last Modfiy Date : Sat Aug 19 10:06:32 IRKT 2017
 * Auto Generate Date : 2017-11-17 11:01:12
  * Warning ! This file will be overwrite when regenerate !
  *
 */
public class ProductModelBaseRelateDAOQueryBean extends BaseQueryBean {
    public ProductModelBaseRelateDAOQueryBean() {
        super();
    }

    public ProductModelBaseRelateDAOQueryBean(BaseQueryBean aQueryBean) {
        super(aQueryBean);
    }

    public ProductModelBaseRelateDAOQueryBean(BaseQueryBean aQueryBean,
        Map tableReplaceMap) {
        super(aQueryBean, tableReplaceMap);
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();

        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }

        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        return new Criteria(this);
    }

    public void addIdSelectProperty() {
        addIdSelectProperty("id");
    }

    public void addIdSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(IProductModelBaseRelateDAO.Id, aAlias);
        } else {
            addSelectProperty(IProductModelBaseRelateDAO.Id, "id");
        }
    }

    public void addModelBaseIdSelectProperty() {
        addModelBaseIdSelectProperty("modelBaseId");
    }

    public void addModelBaseIdSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(IProductModelBaseRelateDAO.ModelBaseId, aAlias);
        } else {
            addSelectProperty(IProductModelBaseRelateDAO.ModelBaseId,
                "modelBaseId");
        }
    }

    public void addModelDomainIdSelectProperty() {
        addModelDomainIdSelectProperty("modelDomainId");
    }

    public void addModelDomainIdSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(IProductModelBaseRelateDAO.ModelDomainId, aAlias);
        } else {
            addSelectProperty(IProductModelBaseRelateDAO.ModelDomainId,
                "modelDomainId");
        }
    }

    public void addStatusSelectProperty() {
        addStatusSelectProperty("status");
    }

    public void addStatusSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(IProductModelBaseRelateDAO.Status, aAlias);
        } else {
            addSelectProperty(IProductModelBaseRelateDAO.Status, "status");
        }
    }

    public void addRemarksSelectProperty() {
        addRemarksSelectProperty("remarks");
    }

    public void addRemarksSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(IProductModelBaseRelateDAO.Remarks, aAlias);
        } else {
            addSelectProperty(IProductModelBaseRelateDAO.Remarks, "remarks");
        }
    }

    public void addAllSelectProperties() {
        addIdSelectProperty();

        addModelBaseIdSelectProperty();

        addModelDomainIdSelectProperty();

        addStatusSelectProperty();

        addRemarksSelectProperty();
    }

    public static class Criteria extends BaseWhereCriterion<ProductModelBaseRelateDAOQueryBean> {
        protected Criteria(ProductModelBaseRelateDAOQueryBean aParentObject) {
            super(aParentObject);
        }

        public Criteria andIdIsNull() {
            addCriterion(IProductModelBaseRelateDAO.Id + " is null");

            return this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion(IProductModelBaseRelateDAO.Id + " is not null");

            return this;
        }

        public Criteria andIdIsNotEmpty() {
            addCriterion(IProductModelBaseRelateDAO.Id + " is not null AND " +
                IProductModelBaseRelateDAO.Id + " <> ''");

            return this;
        }

        public Criteria andIdIsEmpty() {
            addCriterion("(" + IProductModelBaseRelateDAO.Id + " is null OR " +
                IProductModelBaseRelateDAO.Id + " = '')");

            return this;
        }

        public Criteria andIdEqualTo(long value) {
            return andIdEqualTo(Long.valueOf(value));
        }

        public Criteria andIdEqualTo(java.lang.Long value) {
            addCriterion(IProductModelBaseRelateDAO.Id + " = ", value, "id");

            return this;
        }

        public Criteria andIdEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(IProductModelBaseRelateDAO.Id);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andIdEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.Id + " = ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andIdNotEqualTo(long value) {
            return andIdNotEqualTo(Long.valueOf(value));
        }

        public Criteria andIdNotEqualTo(java.lang.Long value) {
            addCriterion(IProductModelBaseRelateDAO.Id + " <>", value, "id");

            return this;
        }

        public Criteria andIdNotEqualToOrIsNull(long value) {
            return andIdNotEqualToOrIsNull(Long.valueOf(value));
        }

        public Criteria andIdNotEqualToOrIsNull(java.lang.Long value) {
            addCriterion(IProductModelBaseRelateDAO.Id + " is null OR " +
                IProductModelBaseRelateDAO.Id + " <>", value, "id");

            return this;
        }

        public Criteria andIdNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(IProductModelBaseRelateDAO.Id);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andIdNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.Id + " <> ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andIdGreaterThan(long value) {
            return andIdGreaterThan(Long.valueOf(value));
        }

        public Criteria andIdGreaterThan(java.lang.Long value) {
            addCriterion(IProductModelBaseRelateDAO.Id + " >", value, "id");

            return this;
        }

        public Criteria andIdGreaterThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(IProductModelBaseRelateDAO.Id);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andIdGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.Id + " > ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andIdGreaterThanOrEqualTo(long value) {
            return andIdGreaterThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andIdGreaterThanOrEqualTo(java.lang.Long value) {
            addCriterion(IProductModelBaseRelateDAO.Id + " >=", value, "id");

            return this;
        }

        public Criteria andIdGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(IProductModelBaseRelateDAO.Id);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andIdGreaterThanOrEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.Id + " >= ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andIdLessThan(long value) {
            return andIdLessThan(Long.valueOf(value));
        }

        public Criteria andIdLessThan(java.lang.Long value) {
            addCriterion(IProductModelBaseRelateDAO.Id + " <", value, "id");

            return this;
        }

        public Criteria andIdLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(IProductModelBaseRelateDAO.Id);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andIdLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.Id + " < ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andIdLessThanOrEqualTo(long value) {
            return andIdLessThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andIdLessThanOrEqualTo(java.lang.Long value) {
            addCriterion(IProductModelBaseRelateDAO.Id + " <=", value, "id");

            return this;
        }

        public Criteria andIdLessThanOrEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(IProductModelBaseRelateDAO.Id);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andIdLessThanOrEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.Id + " <= ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andIdIn(long[] values) {
            if (values.length == 1) {
                return andIdEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(IProductModelBaseRelateDAO.Id + " in", values, "id");

                return this;
            }
        }

        public Criteria andIdNotIn(long[] values) {
            if (values.length == 1) {
                return andIdNotEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(IProductModelBaseRelateDAO.Id + " not in", values,
                    "id");

                return this;
            }
        }

        public Criteria andIdIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andIdEqualTo(values.get(0));
            } else {
                addCriterion(IProductModelBaseRelateDAO.Id + " in", values, "id");

                return this;
            }
        }

        public Criteria andIdNotIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andIdNotEqualTo(values.get(0));
            } else {
                addCriterion(IProductModelBaseRelateDAO.Id + " not in", values,
                    "id");

                return this;
            }
        }

        public Criteria andIdIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andIdEqualTo(values[0]);
            } else {
                addCriterion(IProductModelBaseRelateDAO.Id + " in",
                    Arrays.asList(values), "id");

                return this;
            }
        }

        public Criteria andIdNotIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andIdNotEqualTo(values[0]);
            } else {
                addCriterion(IProductModelBaseRelateDAO.Id + " not in",
                    Arrays.asList(values), "id");

                return this;
            }
        }

        public Criteria andIdIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.Id + " in ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andIdNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.Id + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andIdBetween(long value1, long value2) {
            addCriterion(IProductModelBaseRelateDAO.Id + " between", value1,
                value2, "id");

            return this;
        }

        public Criteria andIdBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(IProductModelBaseRelateDAO.Id + " between", value1,
                value2, "id");

            return this;
        }

        public Criteria andIdNotBetween(long value1, long value2) {
            addCriterion(IProductModelBaseRelateDAO.Id + " not between",
                value1, value2, "id");

            return this;
        }

        public Criteria andIdNotBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(IProductModelBaseRelateDAO.Id + " not between",
                value1, value2, "id");

            return this;
        }

        public Criteria andModelBaseIdIsNull() {
            addCriterion(IProductModelBaseRelateDAO.ModelBaseId + " is null");

            return this;
        }

        public Criteria andModelBaseIdIsNotNull() {
            addCriterion(IProductModelBaseRelateDAO.ModelBaseId +
                " is not null");

            return this;
        }

        public Criteria andModelBaseIdIsNotEmpty() {
            addCriterion(IProductModelBaseRelateDAO.ModelBaseId +
                " is not null AND " + IProductModelBaseRelateDAO.ModelBaseId +
                " <> ''");

            return this;
        }

        public Criteria andModelBaseIdIsEmpty() {
            addCriterion("(" + IProductModelBaseRelateDAO.ModelBaseId +
                " is null OR " + IProductModelBaseRelateDAO.ModelBaseId +
                " = '')");

            return this;
        }

        public Criteria andModelBaseIdEqualTo(long value) {
            return andModelBaseIdEqualTo(Long.valueOf(value));
        }

        public Criteria andModelBaseIdEqualTo(java.lang.Long value) {
            addCriterion(IProductModelBaseRelateDAO.ModelBaseId + " = ", value,
                "modelBaseId");

            return this;
        }

        public Criteria andModelBaseIdEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(IProductModelBaseRelateDAO.ModelBaseId);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andModelBaseIdEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.ModelBaseId + " = ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModelBaseIdNotEqualTo(long value) {
            return andModelBaseIdNotEqualTo(Long.valueOf(value));
        }

        public Criteria andModelBaseIdNotEqualTo(java.lang.Long value) {
            addCriterion(IProductModelBaseRelateDAO.ModelBaseId + " <>", value,
                "modelBaseId");

            return this;
        }

        public Criteria andModelBaseIdNotEqualToOrIsNull(long value) {
            return andModelBaseIdNotEqualToOrIsNull(Long.valueOf(value));
        }

        public Criteria andModelBaseIdNotEqualToOrIsNull(java.lang.Long value) {
            addCriterion(IProductModelBaseRelateDAO.ModelBaseId +
                " is null OR " + IProductModelBaseRelateDAO.ModelBaseId +
                " <>", value, "modelBaseId");

            return this;
        }

        public Criteria andModelBaseIdNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(IProductModelBaseRelateDAO.ModelBaseId);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andModelBaseIdNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.ModelBaseId + " <> ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModelBaseIdGreaterThan(long value) {
            return andModelBaseIdGreaterThan(Long.valueOf(value));
        }

        public Criteria andModelBaseIdGreaterThan(java.lang.Long value) {
            addCriterion(IProductModelBaseRelateDAO.ModelBaseId + " >", value,
                "modelBaseId");

            return this;
        }

        public Criteria andModelBaseIdGreaterThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(IProductModelBaseRelateDAO.ModelBaseId);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andModelBaseIdGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.ModelBaseId + " > ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModelBaseIdGreaterThanOrEqualTo(long value) {
            return andModelBaseIdGreaterThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andModelBaseIdGreaterThanOrEqualTo(java.lang.Long value) {
            addCriterion(IProductModelBaseRelateDAO.ModelBaseId + " >=", value,
                "modelBaseId");

            return this;
        }

        public Criteria andModelBaseIdGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(IProductModelBaseRelateDAO.ModelBaseId);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andModelBaseIdGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.ModelBaseId + " >= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModelBaseIdLessThan(long value) {
            return andModelBaseIdLessThan(Long.valueOf(value));
        }

        public Criteria andModelBaseIdLessThan(java.lang.Long value) {
            addCriterion(IProductModelBaseRelateDAO.ModelBaseId + " <", value,
                "modelBaseId");

            return this;
        }

        public Criteria andModelBaseIdLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(IProductModelBaseRelateDAO.ModelBaseId);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andModelBaseIdLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.ModelBaseId + " < ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModelBaseIdLessThanOrEqualTo(long value) {
            return andModelBaseIdLessThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andModelBaseIdLessThanOrEqualTo(java.lang.Long value) {
            addCriterion(IProductModelBaseRelateDAO.ModelBaseId + " <=", value,
                "modelBaseId");

            return this;
        }

        public Criteria andModelBaseIdLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(IProductModelBaseRelateDAO.ModelBaseId);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andModelBaseIdLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.ModelBaseId + " <= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModelBaseIdIn(long[] values) {
            if (values.length == 1) {
                return andModelBaseIdEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(IProductModelBaseRelateDAO.ModelBaseId + " in",
                    values, "modelBaseId");

                return this;
            }
        }

        public Criteria andModelBaseIdNotIn(long[] values) {
            if (values.length == 1) {
                return andModelBaseIdNotEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(IProductModelBaseRelateDAO.ModelBaseId +
                    " not in", values, "modelBaseId");

                return this;
            }
        }

        public Criteria andModelBaseIdIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andModelBaseIdEqualTo(values.get(0));
            } else {
                addCriterion(IProductModelBaseRelateDAO.ModelBaseId + " in",
                    values, "modelBaseId");

                return this;
            }
        }

        public Criteria andModelBaseIdNotIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andModelBaseIdNotEqualTo(values.get(0));
            } else {
                addCriterion(IProductModelBaseRelateDAO.ModelBaseId +
                    " not in", values, "modelBaseId");

                return this;
            }
        }

        public Criteria andModelBaseIdIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andModelBaseIdEqualTo(values[0]);
            } else {
                addCriterion(IProductModelBaseRelateDAO.ModelBaseId + " in",
                    Arrays.asList(values), "modelBaseId");

                return this;
            }
        }

        public Criteria andModelBaseIdNotIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andModelBaseIdNotEqualTo(values[0]);
            } else {
                addCriterion(IProductModelBaseRelateDAO.ModelBaseId +
                    " not in", Arrays.asList(values), "modelBaseId");

                return this;
            }
        }

        public Criteria andModelBaseIdIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.ModelBaseId + " in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModelBaseIdNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.ModelBaseId + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModelBaseIdBetween(long value1, long value2) {
            addCriterion(IProductModelBaseRelateDAO.ModelBaseId + " between",
                value1, value2, "modelBaseId");

            return this;
        }

        public Criteria andModelBaseIdBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(IProductModelBaseRelateDAO.ModelBaseId + " between",
                value1, value2, "modelBaseId");

            return this;
        }

        public Criteria andModelBaseIdNotBetween(long value1, long value2) {
            addCriterion(IProductModelBaseRelateDAO.ModelBaseId +
                " not between", value1, value2, "modelBaseId");

            return this;
        }

        public Criteria andModelBaseIdNotBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(IProductModelBaseRelateDAO.ModelBaseId +
                " not between", value1, value2, "modelBaseId");

            return this;
        }

        public Criteria andModelDomainIdIsNull() {
            addCriterion(IProductModelBaseRelateDAO.ModelDomainId + " is null");

            return this;
        }

        public Criteria andModelDomainIdIsNotNull() {
            addCriterion(IProductModelBaseRelateDAO.ModelDomainId +
                " is not null");

            return this;
        }

        public Criteria andModelDomainIdIsNotEmpty() {
            addCriterion(IProductModelBaseRelateDAO.ModelDomainId +
                " is not null AND " + IProductModelBaseRelateDAO.ModelDomainId +
                " <> ''");

            return this;
        }

        public Criteria andModelDomainIdIsEmpty() {
            addCriterion("(" + IProductModelBaseRelateDAO.ModelDomainId +
                " is null OR " + IProductModelBaseRelateDAO.ModelDomainId +
                " = '')");

            return this;
        }

        public Criteria andModelDomainIdEqualTo(long value) {
            return andModelDomainIdEqualTo(Long.valueOf(value));
        }

        public Criteria andModelDomainIdEqualTo(java.lang.Long value) {
            addCriterion(IProductModelBaseRelateDAO.ModelDomainId + " = ",
                value, "modelDomainId");

            return this;
        }

        public Criteria andModelDomainIdEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(IProductModelBaseRelateDAO.ModelDomainId);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andModelDomainIdEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.ModelDomainId + " = ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModelDomainIdNotEqualTo(long value) {
            return andModelDomainIdNotEqualTo(Long.valueOf(value));
        }

        public Criteria andModelDomainIdNotEqualTo(java.lang.Long value) {
            addCriterion(IProductModelBaseRelateDAO.ModelDomainId + " <>",
                value, "modelDomainId");

            return this;
        }

        public Criteria andModelDomainIdNotEqualToOrIsNull(long value) {
            return andModelDomainIdNotEqualToOrIsNull(Long.valueOf(value));
        }

        public Criteria andModelDomainIdNotEqualToOrIsNull(java.lang.Long value) {
            addCriterion(IProductModelBaseRelateDAO.ModelDomainId +
                " is null OR " + IProductModelBaseRelateDAO.ModelDomainId +
                " <>", value, "modelDomainId");

            return this;
        }

        public Criteria andModelDomainIdNotEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(IProductModelBaseRelateDAO.ModelDomainId);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andModelDomainIdNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.ModelDomainId + " <> ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModelDomainIdGreaterThan(long value) {
            return andModelDomainIdGreaterThan(Long.valueOf(value));
        }

        public Criteria andModelDomainIdGreaterThan(java.lang.Long value) {
            addCriterion(IProductModelBaseRelateDAO.ModelDomainId + " >",
                value, "modelDomainId");

            return this;
        }

        public Criteria andModelDomainIdGreaterThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(IProductModelBaseRelateDAO.ModelDomainId);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andModelDomainIdGreaterThan(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.ModelDomainId + " > ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModelDomainIdGreaterThanOrEqualTo(long value) {
            return andModelDomainIdGreaterThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andModelDomainIdGreaterThanOrEqualTo(
            java.lang.Long value) {
            addCriterion(IProductModelBaseRelateDAO.ModelDomainId + " >=",
                value, "modelDomainId");

            return this;
        }

        public Criteria andModelDomainIdGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(IProductModelBaseRelateDAO.ModelDomainId);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andModelDomainIdGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.ModelDomainId + " >= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModelDomainIdLessThan(long value) {
            return andModelDomainIdLessThan(Long.valueOf(value));
        }

        public Criteria andModelDomainIdLessThan(java.lang.Long value) {
            addCriterion(IProductModelBaseRelateDAO.ModelDomainId + " <",
                value, "modelDomainId");

            return this;
        }

        public Criteria andModelDomainIdLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(IProductModelBaseRelateDAO.ModelDomainId);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andModelDomainIdLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.ModelDomainId + " < ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModelDomainIdLessThanOrEqualTo(long value) {
            return andModelDomainIdLessThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andModelDomainIdLessThanOrEqualTo(java.lang.Long value) {
            addCriterion(IProductModelBaseRelateDAO.ModelDomainId + " <=",
                value, "modelDomainId");

            return this;
        }

        public Criteria andModelDomainIdLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(IProductModelBaseRelateDAO.ModelDomainId);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andModelDomainIdLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.ModelDomainId + " <= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModelDomainIdIn(long[] values) {
            if (values.length == 1) {
                return andModelDomainIdEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(IProductModelBaseRelateDAO.ModelDomainId + " in",
                    values, "modelDomainId");

                return this;
            }
        }

        public Criteria andModelDomainIdNotIn(long[] values) {
            if (values.length == 1) {
                return andModelDomainIdNotEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(IProductModelBaseRelateDAO.ModelDomainId +
                    " not in", values, "modelDomainId");

                return this;
            }
        }

        public Criteria andModelDomainIdIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andModelDomainIdEqualTo(values.get(0));
            } else {
                addCriterion(IProductModelBaseRelateDAO.ModelDomainId + " in",
                    values, "modelDomainId");

                return this;
            }
        }

        public Criteria andModelDomainIdNotIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andModelDomainIdNotEqualTo(values.get(0));
            } else {
                addCriterion(IProductModelBaseRelateDAO.ModelDomainId +
                    " not in", values, "modelDomainId");

                return this;
            }
        }

        public Criteria andModelDomainIdIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andModelDomainIdEqualTo(values[0]);
            } else {
                addCriterion(IProductModelBaseRelateDAO.ModelDomainId + " in",
                    Arrays.asList(values), "modelDomainId");

                return this;
            }
        }

        public Criteria andModelDomainIdNotIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andModelDomainIdNotEqualTo(values[0]);
            } else {
                addCriterion(IProductModelBaseRelateDAO.ModelDomainId +
                    " not in", Arrays.asList(values), "modelDomainId");

                return this;
            }
        }

        public Criteria andModelDomainIdIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.ModelDomainId + " in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModelDomainIdNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.ModelDomainId + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModelDomainIdBetween(long value1, long value2) {
            addCriterion(IProductModelBaseRelateDAO.ModelDomainId + " between",
                value1, value2, "modelDomainId");

            return this;
        }

        public Criteria andModelDomainIdBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(IProductModelBaseRelateDAO.ModelDomainId + " between",
                value1, value2, "modelDomainId");

            return this;
        }

        public Criteria andModelDomainIdNotBetween(long value1, long value2) {
            addCriterion(IProductModelBaseRelateDAO.ModelDomainId +
                " not between", value1, value2, "modelDomainId");

            return this;
        }

        public Criteria andModelDomainIdNotBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(IProductModelBaseRelateDAO.ModelDomainId +
                " not between", value1, value2, "modelDomainId");

            return this;
        }

        public Criteria andStatusIsNull() {
            addCriterion(IProductModelBaseRelateDAO.Status + " is null");

            return this;
        }

        public Criteria andStatusIsNotNull() {
            addCriterion(IProductModelBaseRelateDAO.Status + " is not null");

            return this;
        }

        public Criteria andStatusIsNotEmpty() {
            addCriterion(IProductModelBaseRelateDAO.Status +
                " is not null AND " + IProductModelBaseRelateDAO.Status +
                " <> ''");

            return this;
        }

        public Criteria andStatusIsEmpty() {
            addCriterion("(" + IProductModelBaseRelateDAO.Status +
                " is null OR " + IProductModelBaseRelateDAO.Status + " = '')");

            return this;
        }

        public Criteria andStatusEqualTo(String value) {
            addCriterion(IProductModelBaseRelateDAO.Status + " = ", value,
                "status");

            return this;
        }

        public Criteria andStatusEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(IProductModelBaseRelateDAO.Status);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andStatusEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.Status + " = ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andStatusNotEqualTo(String value) {
            addCriterion(IProductModelBaseRelateDAO.Status + " <>", value,
                "status");

            return this;
        }

        public Criteria andStatusNotEqualToOrIsNull(String value) {
            addCriterion(IProductModelBaseRelateDAO.Status + " is null OR " +
                IProductModelBaseRelateDAO.Status + " <>", value, "status");

            return this;
        }

        public Criteria andStatusNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(IProductModelBaseRelateDAO.Status);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andStatusNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.Status + " <> ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andStatusGreaterThan(String value) {
            addCriterion(IProductModelBaseRelateDAO.Status + " >", value,
                "status");

            return this;
        }

        public Criteria andStatusGreaterThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(IProductModelBaseRelateDAO.Status);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andStatusGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.Status + " > ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(String value) {
            addCriterion(IProductModelBaseRelateDAO.Status + " >=", value,
                "status");

            return this;
        }

        public Criteria andStatusGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(IProductModelBaseRelateDAO.Status);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.Status + " >= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andStatusLessThan(String value) {
            addCriterion(IProductModelBaseRelateDAO.Status + " <", value,
                "status");

            return this;
        }

        public Criteria andStatusLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(IProductModelBaseRelateDAO.Status);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andStatusLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.Status + " < ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andStatusLessThanOrEqualTo(String value) {
            addCriterion(IProductModelBaseRelateDAO.Status + " <=", value,
                "status");

            return this;
        }

        public Criteria andStatusLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(IProductModelBaseRelateDAO.Status);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andStatusLessThanOrEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.Status + " <= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andStatusLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(IProductModelBaseRelateDAO.Status + " like",
                buffer.toString(), "status");

            return this;
        }

        public Criteria andStatusNotLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(IProductModelBaseRelateDAO.Status + " not like",
                buffer.toString(), "status");

            return this;
        }

        public Criteria andStatusIn(List<String> values) {
            if (values.size() == 1) {
                return andStatusEqualTo(values.get(0));
            } else {
                addCriterion(IProductModelBaseRelateDAO.Status + " in", values,
                    "status");

                return this;
            }
        }

        public Criteria andStatusNotIn(List<String> values) {
            if (values.size() == 1) {
                return andStatusNotEqualTo(values.get(0));
            } else {
                addCriterion(IProductModelBaseRelateDAO.Status + " not in",
                    values, "status");

                return this;
            }
        }

        public Criteria andStatusIn(String[] values) {
            if (values.length == 1) {
                return andStatusEqualTo(values[0]);
            } else {
                addCriterion(IProductModelBaseRelateDAO.Status + " in",
                    Arrays.asList(values), "status");

                return this;
            }
        }

        public Criteria andStatusNotIn(String[] values) {
            if (values.length == 1) {
                return andStatusNotEqualTo(values[0]);
            } else {
                addCriterion(IProductModelBaseRelateDAO.Status + " not in",
                    Arrays.asList(values), "status");

                return this;
            }
        }

        public Criteria andStatusIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.Status + " in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andStatusNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.Status + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andStatusBetween(String value1, String value2) {
            addCriterion(IProductModelBaseRelateDAO.Status + " between",
                value1, value2, "status");

            return this;
        }

        public Criteria andStatusNotBetween(String value1, String value2) {
            addCriterion(IProductModelBaseRelateDAO.Status + " not between",
                value1, value2, "status");

            return this;
        }

        public Criteria andRemarksIsNull() {
            addCriterion(IProductModelBaseRelateDAO.Remarks + " is null");

            return this;
        }

        public Criteria andRemarksIsNotNull() {
            addCriterion(IProductModelBaseRelateDAO.Remarks + " is not null");

            return this;
        }

        public Criteria andRemarksIsNotEmpty() {
            addCriterion(IProductModelBaseRelateDAO.Remarks +
                " is not null AND " + IProductModelBaseRelateDAO.Remarks +
                " <> ''");

            return this;
        }

        public Criteria andRemarksIsEmpty() {
            addCriterion("(" + IProductModelBaseRelateDAO.Remarks +
                " is null OR " + IProductModelBaseRelateDAO.Remarks + " = '')");

            return this;
        }

        public Criteria andRemarksEqualTo(String value) {
            addCriterion(IProductModelBaseRelateDAO.Remarks + " = ", value,
                "remarks");

            return this;
        }

        public Criteria andRemarksEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(IProductModelBaseRelateDAO.Remarks);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRemarksEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.Remarks + " = ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andRemarksNotEqualTo(String value) {
            addCriterion(IProductModelBaseRelateDAO.Remarks + " <>", value,
                "remarks");

            return this;
        }

        public Criteria andRemarksNotEqualToOrIsNull(String value) {
            addCriterion(IProductModelBaseRelateDAO.Remarks + " is null OR " +
                IProductModelBaseRelateDAO.Remarks + " <>", value, "remarks");

            return this;
        }

        public Criteria andRemarksNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(IProductModelBaseRelateDAO.Remarks);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRemarksNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.Remarks + " <> ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andRemarksGreaterThan(String value) {
            addCriterion(IProductModelBaseRelateDAO.Remarks + " >", value,
                "remarks");

            return this;
        }

        public Criteria andRemarksGreaterThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(IProductModelBaseRelateDAO.Remarks);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRemarksGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.Remarks + " > ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andRemarksGreaterThanOrEqualTo(String value) {
            addCriterion(IProductModelBaseRelateDAO.Remarks + " >=", value,
                "remarks");

            return this;
        }

        public Criteria andRemarksGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(IProductModelBaseRelateDAO.Remarks);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRemarksGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.Remarks + " >= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andRemarksLessThan(String value) {
            addCriterion(IProductModelBaseRelateDAO.Remarks + " <", value,
                "remarks");

            return this;
        }

        public Criteria andRemarksLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(IProductModelBaseRelateDAO.Remarks);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRemarksLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.Remarks + " < ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andRemarksLessThanOrEqualTo(String value) {
            addCriterion(IProductModelBaseRelateDAO.Remarks + " <=", value,
                "remarks");

            return this;
        }

        public Criteria andRemarksLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(IProductModelBaseRelateDAO.Remarks);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRemarksLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.Remarks + " <= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andRemarksLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(IProductModelBaseRelateDAO.Remarks + " like",
                buffer.toString(), "remarks");

            return this;
        }

        public Criteria andRemarksNotLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(IProductModelBaseRelateDAO.Remarks + " not like",
                buffer.toString(), "remarks");

            return this;
        }

        public Criteria andRemarksIn(List<String> values) {
            if (values.size() == 1) {
                return andRemarksEqualTo(values.get(0));
            } else {
                addCriterion(IProductModelBaseRelateDAO.Remarks + " in",
                    values, "remarks");

                return this;
            }
        }

        public Criteria andRemarksNotIn(List<String> values) {
            if (values.size() == 1) {
                return andRemarksNotEqualTo(values.get(0));
            } else {
                addCriterion(IProductModelBaseRelateDAO.Remarks + " not in",
                    values, "remarks");

                return this;
            }
        }

        public Criteria andRemarksIn(String[] values) {
            if (values.length == 1) {
                return andRemarksEqualTo(values[0]);
            } else {
                addCriterion(IProductModelBaseRelateDAO.Remarks + " in",
                    Arrays.asList(values), "remarks");

                return this;
            }
        }

        public Criteria andRemarksNotIn(String[] values) {
            if (values.length == 1) {
                return andRemarksNotEqualTo(values[0]);
            } else {
                addCriterion(IProductModelBaseRelateDAO.Remarks + " not in",
                    Arrays.asList(values), "remarks");

                return this;
            }
        }

        public Criteria andRemarksIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.Remarks + " in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andRemarksNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(IProductModelBaseRelateDAO.Remarks + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andRemarksBetween(String value1, String value2) {
            addCriterion(IProductModelBaseRelateDAO.Remarks + " between",
                value1, value2, "remarks");

            return this;
        }

        public Criteria andRemarksNotBetween(String value1, String value2) {
            addCriterion(IProductModelBaseRelateDAO.Remarks + " not between",
                value1, value2, "remarks");

            return this;
        }
    }
}
